# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Nikolaus Brandt <sua-aur-661bbb3b@brandt-n.eu>

pkgname=python2-ipaddress
pkgver=1.0.23
pkgrel=2
pkgdesc="IPv4/IPv6 manipulation library"
arch=(any)
url="https://github.com/phihag/ipaddress"
license=('custom:PSF')
depends=('python2')
source=("https://pypi.io/packages/source/i/ipaddress/ipaddress-$pkgver.tar.gz"
        LICENSE)
sha512sums=('340e2a8698df1868038f55889671442eba17f06ec3f493759d8d0a9bf406eefbe1f67c14ca616f52e5bf2280942dcece7e89fb19de0923bee1ee20e60f48896e'
            '5cc59a125412b0eb35f05d40756db050805fc1bd5729f350796644ad92b8117f8d3ed3c7cf6ab8b072518706bf95a1d40f016d065726a1296e19ea09582ec385')

check() {
  # Not included in release tarball
  cd ipaddress-$pkgver
  # python2 test_ipaddress.py
}

package() {
  cd ipaddress-$pkgver
  python2 setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
